package com.sdwz.borrow.controller;


import com.sdwz.borrow.client.LibraryClient;
import com.sdwz.borrow.entity.AppointmentInfo;
import com.sdwz.borrow.entity.BookInfo;
import com.sdwz.borrow.entity.vo.AppointmentVo;
import com.sdwz.borrow.service.AppointmentInfoService;
import com.sdwz.commonutil.Result;
import com.sdwz.serviceutil.utils.JwtUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.awt.print.Book;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 预约信息表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2021-03-30
 */
@RestController
@RequestMapping("/admin/borrow")
public class AppointmentInfoController {

    @Autowired
    AppointmentInfoService appointmentInfoService;

    @Autowired
    LibraryClient libraryClient;

    /**
     * 分页查看预约表信息
     * @param current
     * @param limit
     * @param appointmentVo
     * @return
     */
    @GetMapping("/appointment/list/{current}/{limit}")
    public Result appointmentList(@PathVariable Long current,
                                  @PathVariable Long limit,
                                  AppointmentVo appointmentVo){

        Map<String, Object> result = appointmentInfoService.appointmentPages(current, limit, appointmentVo);
        return Result.ok(result);
    }


}

